<template>
    <div class="form-block-inner">
        <Form :model="formItem" label-position="top" ref="baseForm">
            <div class="title-style">影印材料</div>
            <common-files-upload :show-files-list="fileList" @result="resultAction"></common-files-upload>
            <common-save-btn v-if="false"></common-save-btn>
        </Form>
    </div>
</template>

<script>
import CommonSaveBtn from '@/components/common-save-btn/index'
import CommonFilesUpload from '@/components/comon-files-upload/index'

export default {
  name: 'KaoHeInfo',
  components: { CommonFilesUpload, CommonSaveBtn },
  props: {
    formItem: {
      type: Object,
      default: () => {
        return {}
      }
    }
  },
  data () {
    return {
      fileList: [
        { name: '个人鉴定材料(3-1-1-1 至 3-1-1-100)', value: '', key: { a: 3, b: 1 } },
        {
          name: '出国、调动、转业材料(3-2-1-1 至 3-2-1-100)',
          value: '',
          key: { a: 3, b: 2 },
          desc: '出国(境)、调动、转业及其他一些鉴定性质的材料(毕业、结业鉴定材料归入档案第四类)\n'
        },
        {
          name: '定期考核材料、年度考核登记表、援藏、援疆、援青、挂职锻炼等考核材料(3-3-1-1 至 3-3-1-100)',
          value: '',
          key: { a: 3, b: 3 },
          desc: '以考核为主要内容的材料,如定期考核材料,年度考核登记表,援藏、援疆、援青、挂职锻炼等考核材料'
        },
        { name: '重大政治事件、突发事件和重大任务中的表现材料(3-4-1-1 至 3-4-1-100)', value: '', key: { a: 3, b: 4 } },
        { name: '后备干部登记表(3-5-1-1 至 3-5-1-100)', value: '', key: { a: 3, b: 5 } },
        {
          name: '专项考核形成的重要材料(3-6-1-1 至 3-6-1-100)',
          value: '',
          key: '1',
          desc: '专项考核形成的重要材料;实行任期制和任期目标责任制的领导人员的任期考核评价意见;干部人才参加援派、挂职、扶贫和博士服务团等工作形成的考核、鉴定材料,党委(党组)对下一级党组织书记抓基层党建工作情况的综合评价意见等\n'
        }
      ]
    }
  },
  watch: {
    formItem (data) {
      this.fileList[0].value = data.three_one
      this.fileList[1].value = data.three_two
      this.fileList[2].value = data.three_three
      this.fileList[3].value = data.three_four
      this.fileList[4].value = data.three_five
      this.fileList[5].value = data.three_six
    }

  },
  methods: {
    resultAction (data) {
      this.formItem.three_one = data[0].value
      this.formItem.three_two = data[1].value
      this.formItem.three_three = data[2].value
      this.formItem.three_four = data[3].value
      this.formItem.three_five = data[4].value
      this.formItem.three_six = data[5].value
    }
  }
}
</script>

<style scoped>

</style>
